/**
 * @Date: Feb 19, 2010 1:18:14 PM
 */
package com.philip.journal.home.service;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import com.philip.journal.core.exception.JournalException;

/**
 * @author cry30
 */
public interface ImportExportXmlService {

    /** RTFC. */
    int INDENT_SIZE = 4;

    /**
     * Imports Branch and Entry data from xml files. Existing data will be replaced by the contents of the xml file.
     * 
     * @param session - server side session.
     * @param xmlData - xml data to import.
     * @exception JournalException wrapper application exception.
     */
    void importCodeXML(Map<String, Object> session, InputStream xmlData);

    /**
     * Converts all entry data in the DB to xml.
     * 
     * @param session - server side session.
     * @param targetStream - stream to write the Xml output to.
     * @exception JournalException - when the export to xml fails for some reason.
     */
    void exportToXML(Map<String, Object> session, OutputStream targetStream);

    /**
     * Moves a folder to another folder.
     * 
     * @param session - server side session.
     * @param newParentId - id of the new parent id to put the branch into.
     * @param branchId - id of the branch to move
     * @exception JournalException - thrown when the move fails due to constraint.
     */

}
